package edu.sctu.practice.class02.hujie.cgs.assign08.three;

import java.awt.*;

/**
 * Created by hp on 2015/12/21.
 */
public class ImageCanvas extends Canvas{
    Image image=null;
    public ImageCanvas(){
        setSize(200,200);
    }
    public void paint(Graphics g){
        if (image!=null)
            g.drawImage(image,0,0,this);
    }
    public void setImage(Image image){
        this.image=image;
    }
}
